<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%> 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'customer.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript" src="jquery/js/jquery-1.8.2.js"></script>
<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
<link rel="stylesheet" type="text/css" href="<%=basePath%>/css/biaoge.css"/>
</head>
  <script type="text/javascript">
  /* var c=$("#chakan");
  var go=$("#gong");
  var jub=$("#jubao"); */

  
  function ju(){
    window.location="showReport.action";
  }
  function cha(){
 
   window.location="showCustomer.action";
     
  }
  
  function g(){
    window.location="showindustry.action";
  }
  
  function kai(a){
   var k=document.getElementById("zuihou");
  if(a<=2) k.innerHTML="这已经第一页了";
  }
  function zui(a,b){
  var z=document.getElementById("zuihou");
  if(a>b-1) z.innerHTML="这已经是最后一页了";
  }
  
  function tong(hid1,id){
    //var hid1=document.getElementById("hid1").value;
 	if(confirm("确定通过吗？")){
 	 //alert("reportsuccess.action?username:"+k);
    	window.location="reportsuccess.action?username="+hid1+"&&reportId="+id;
    }  
  }
  function butong(hid2,id){
  // var hid2=document.getElementById("hid2").value;
  if(confirm("确定不通过吗？")){
      window.location="reportfail.action?username="+hid2+"&&reportId="+id;
    }
  }
  
  function deletecom(k,a){
  if(a!=""&&a!=null){
     if(confirm("确定要删除此条评论吗？")){
     window.location="deletecomment?reportid="+k+"&&commentid="+a;
     alert("评论已经删除");
     }
     }
  }
  </script>
  <body> 
   <div style="width:750px; float:right;margin-top:50px;" id="jubao">
   <table id="mytable" cellspacing="2">
  <tr>
  <td>被举报人</td>  <td>举报人</td> <td>举报原因</td><td>时间</td><td>被举报人所发评论</td><td>是否删除此条信息</td><td>审查结果（通过OR不通过）</td></tr>
   <c:forEach items="${relist}" var="reli"> 
  <tr>
  <td>${reli.bereporterName}</td><td>${reli.reporterName}</td>  
   <td>${reli.reportcontent}</td>  
   <td><fmt:formatDate value="${reli.reporttime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
   <td>
  			 ${reli.commentContent}
    </td>
   <td><input type="button" value="删除"  class="btn" onclick="deletecom('${reli.reportId}','${reli.commentId}')"></td>
   <td style="text-align:center">
    <input type="button" value="通过" class="${reli.state==1?'btn':'btn2' }" onclick="tong('${reli.bereporterName}',${reli.reportId })">
   	<input type="button" value="不通过" class="${reli.state==0?'btn':'btn2' }" onclick="butong('${reli.bereporterName}',${reli.reportId })">
   	
   	</td></tr>
   </c:forEach>
   </table>
  <br>
  
  <div style="margin-left: 200px;margin-top: 50px">
 <a href="showReport?page=1"> 首页</a>&lt;<a href="showReport?page=${pagenow-1}" onclick="kai(${pagenow})">上一页</a>
							<strong>第${pagenow}页/共${pagecount}页</strong>
							<a href="showReport?page=${pagenow+1}" onclick="zui(${pagenow},${pagecount})"> 下一页</a>&gt;
							<a href="showReport?page=${pagecount}">末页</a>&gt;&gt;
						</p>
						<font size="2" color="red" id="zuihou"></font>
						</div>	
						</div>
   </body>
</html>
